package com.example.hms.controller;
import com.example.hms.entity.ReserveRecords;
import com.example.hms.service.ReserveRecordsService;
import com.example.hms.ulit.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@RestController
@RequestMapping("/reserveRecords")
public class ReserveRecordsController {
    @Resource
    private ReserveRecordsService Service;
    @RequestMapping(value = "/selectAllReserveRecords",method = RequestMethod.GET)
    public Result selectAllReserveRecords(String roomNumber, String customerName, String identificationCard) {
        return Service.selectAllReserveRecords(roomNumber,  customerName, identificationCard);}
    @RequestMapping(value = "/insert",method = RequestMethod.GET)
    public int insert(ReserveRecords reserveRecords) {
        return Service.insert(reserveRecords);
    }
    @RequestMapping(value = "/update",method = RequestMethod.GET)
    public Result update(ReserveRecords reserveRecords) {
        return Service.update(reserveRecords);
    }
    @RequestMapping(value = "/delete",method = RequestMethod.GET)
    public Result delete(ReserveRecords reserveRecords) {
        return Service.delete(reserveRecords);
    }
}
